package com.emergency.order.service.impl;

import com.emergency.base.domain.Order;
import com.emergency.base.domain.Scenar;
import com.emergency.base.domain.Woven;
import com.emergency.order.service.DocService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author lijie
 */
@Service
public class DocServiceImpl implements DocService {

	@Autowired
	private RabbitTemplate rabbitTemplate;

	private static final Logger logger = LoggerFactory.getLogger(DocService.class);


	@Override
	public boolean sendCommand(Order order) {
		rabbitTemplate.convertAndSend("itcast", "直接模式测试");
		rabbitTemplate.convertAndSend("fenlie","","分裂模式测试");
		rabbitTemplate.convertAndSend("topictest","good.log","主题模式测试");

		return true;
	}

	@Override
	public boolean sendInitial(Scenar scenar, List<Woven> wovens) {
		return false;
	}
}
